package movee.spring.app.template.io.wall;

import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;

public class HttpClientRequestFactory {

    public static ClientHttpRequestFactory newHttpComponentsFactory(int connectTimeoutMs, int readTimeoutMs) {
        HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory();
        httpRequestFactory.setConnectTimeout(connectTimeoutMs);
        httpRequestFactory.setReadTimeout(readTimeoutMs);
        return  httpRequestFactory;
    }


}
